<?php
namespace app\index\controller;

class Index extends Pre
//class Index
{
    public function index()
    {
        if (request()->isMobile()){
            return view();
        }
        else{
            return view('indexPC');
        }
    }
    public function homepage()
    {
        if (request()->isMobile()){
            return view();
        }
        else{
            return view('homepagePC');
        }
    }
    public function post01()
    {
        return view();
    }
    public function project01()
    {
        return view();
    }
    public function project02()
    {
        return view();
    }
    //提交到后台数据库
    public function submit(){
        $data = input('param.');
        dump($data);
    }
    public function post()
    {
        return view();
    }
    public function ceshi(){
        //读取微信配置
        $options = [
            'appid' => 'wx07ab75f91125067d',
            'appSecret' => '7622afecf8e869098316bc3764c6b407'
        ];
        $weObj = new \wechat\Jssdk($options['appid'],$options['appSecret']);
        //微信分享
        $wechat = $weObj -> GetSignPackage();
        dump($wechat);exit;
        $this -> assign('signPackage',$wechat);
    }
}
